---
description: 'Take control of your GraphQL execution with Sofa. Learn how to pass your own logic using the execute function for custom operations, even with remote GraphQL servers. #GraphQL #Sofa'
---

# Custom Execute Phase

By default, Sofa uses `graphql` function from `graphql-js` package to resolve an operation but it's very straightforward to pass your own logic. Thanks to that you can even use a remote GraphQL Server (with `Fetch` or through Apollo Links).

```typescript
api.use(
  '/api',
  useSofa({
    schema,
    async execute(args) {
      return yourOwnLogicHere(args);
    },
  })
);
```
